<?php
    !isset($header['keywords']) AND $header['keywords'] = '';
    !isset($header['description']) AND $header['description'] = '';
    !isset($header['title']) AND $header['title'] = '';
    !isset($keyword) AND $keyword = '';
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <?php if(APP_PATH != './') { ?> <base href="<?php echo APP_PATH; ?>"> <?php } ?>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="author" content="XiunoBBS 3.0">
    <meta name="keywords" content="<?php echo $header['keywords']; ?>">
    <meta name="description" content="<?php echo $header['description']; ?>">
    <meta name="renderer" content="webkit">
    <!--<meta name="baidu-site-verification" content="WPwLXn7akV" />-->
    <title><?php echo $header['title']; ?></title>
    <link rel="shortcut icon" href="static/favicon.ico">
    <link rel="icon" sizes="32x32" href="static/favicon.ico">
    <link rel="Bookmark" href="static/favicon.ico">
    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css">
    <link rel="stylesheet" href="pc/view/css/twitter.css">
    <link rel="stylesheet" href="pc/view/css/xiunoui.css">
    <script>var debug = <?php echo DEBUG; ?>;</script>

    <style>
           .breadcrumb {
            /*background-color: #fcfcfc;*/
            /*border-bottom: 1px solid #f3f3f3;*/
            height: 33px;
          }

          div {
              display: block;
          }

          .breadcrumb .bread-wrap {
              font: 12px/1.5 "\5b8b\4f53",arial,sans-serif;
              color: #666;
              width: 1070px;
              margin: 0 auto;
              padding: 8px 0;
              position: relative;
          }

          .body-wrapper {
              font-family: "Microsoft Yahei", 微软雅黑, arial, 宋体, sans-serif;
              width: auto;
          }
    </style>

</head>

<body>

<div class="tw-header" id="header">
    <div class="top-nav dropdown">
        <ul class="left-nav" id="forumlist">
            <!--<li>-->
            <!--<a class="logo" title="ITTUN" href="./">-->
            <!--<img src="pc/view/img/logo.png" alt="logo.png">-->
            <!--</a>-->
            <!--</li>-->
            <li class="ml15" fid="0">
                <a class="logo" title="首页" href="./">首页 <i class="newthreads" fid="0">0</i></a>
            </li>
            <?php if(is_array($forumlist_show)) { foreach($forumlist_show as &$f) { ?>
            <li fid="<?php echo $f['fid']; ?>"><a href="forum-<?php echo $f['fid']; ?>.htm"><?php echo $f['name']; ?> <i
                    class="newthreads" fid="<?php echo $f['fid']; ?>">0</i></a></li>
            <?php } } ?>
        </ul>
        <div class="right-nav" id="user">
            <div class="search">
                <form action="search.htm" method="GET" id="srch_form">
                    <input type="text" class="search-input" name="keyword"
                           value="<?php echo isset($keyword) ? $keyword : ''; ?>" placeholder="搜索">
                    <span class="search-icon">
                        <button class="web-icon nav-search" type="submit" tabindex="-1">
                        </button>
                    </span>
                </form>
            </div>
            <?php if(empty($gid)) { ?>
            <div class="signin">
                <!--TODO <a href="http://flarum.cc/plugin/xn_qq_login/qq_login.php?action=login" title="使用QQ账号登录"><i class="fa fa-qq f16"></i></a>&nbsp;&nbsp;-->
                <a href="user-login.htm">登录</a>&nbsp;&nbsp;
                <a href="user-create.htm">注册</a>
            </div>
            <?php } else { ?>
            <div class="settings dropdown">
                <a class="dropdown-toggle" id="settings" title="设置" href="javascript:;">
                    <img src="<?php echo $user['avatar_url']; ?>" class="nav-settings" width="32px" height="32">
                </a>
                <ul class="dropdown-menu dropdown-menu-right">
                    <li><a href="my.htm">设置</a></li>
                    <li><a href="user-logout.htm">退出</a></li>
                </ul>
            </div>
            <div class="write">
                <a class="write-btn" title="发帖" href="thread-create<?php echo (empty($fid) ? '' : " -$fid"); ?>.htm">
                <i class="web-icon nav-write">
                </i>
                </a>
            </div>
            <?php } ?>
        </div>
    </div>
</div>

<div class="breadcrumb" id="breadcrumb">
  <div class="bread-wrap" id="bread-wrap">
  <a href="./">首页
    <?php if(!empty($header['navs'])) { foreach($header['navs'] as $nav) { ?>
        <i class="icon angle-right"><</i> <?php echo $nav; ?>
     <?php } } ?>
  </div>
</div>
